package com.ctl.test.po;

import lombok.Getter;
import lombok.Setter;

/**
 * <p>Title: Person</p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2018</p>
 * <p>Company: www.hanshow.com</p>
 *
 * @author guolin
 * @version 1.0
 * @date 2018-12-05 10:20
 */
@Getter
@Setter
public class Person1<T>{
    private Long id;
    private String name;
    private T data;
    public Person1() {
    }

    public Person1(Long id, String name, T data) {
        this.id = id;
        this.name = name;
        this.data = data;
    }

    public Person1 withId(Long id) {
        this.id = id;
        return this;
    }

    public Person1 withName(String name) {
        this.name = name;
        return this;
    }

    public Person1 withData(T data) {
        this.data = data;
        return this;
    }



    public Person1(Long id, String name) {
        this.id = id;
        this.name = name;
    }

    @Override
    public String toString() {
        return "Person{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", data=" + data +
                '}';
    }
}